﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/PageTemplate.Master"
    AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="FrameWork.web.Module.IntegralMS.IntegralMS.StudentManager.Index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" runat="server">
    <link rel="stylesheet" type="text/css" href="<%=Page.ResolveUrl("~/") %>inc/FineMessBox/css/subModal.css" />
    <script type="text/javascript" src="<%=Page.ResolveUrl("~/") %>inc/FineMessBox/js/common.js"></script>
    <script type="text/javascript" src="<%=Page.ResolveUrl("~/") %>inc/FineMessBox/js/subModal.js"></script>
    <FrameWorkWebControls:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server"
        ButtonList-Capacity="4" HeadOPTxt="学员资料管理" HeadTitleTxt="学员资料管理" HeadHelpTxt="点击学员姓名进入学员管理">
        <FrameWorkWebControls:HeadMenuButtonItem ButtonPopedom="New" ButtonUrlType="Href"
            ButtonVisible="True" ButtonUrl="StudentManager.aspx?CMD=New" ButtonName="学员" />
    </FrameWorkWebControls:HeadMenuWebControls>
    <FrameWorkWebControls:TabOptionWebControls ID="TabOptionWebControls1" runat="server">
        <FrameWorkWebControls:TabOptionItem ID="TabOptionItem1" runat="server" Tab_Name="学员信息列表">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
                <Columns>
                    <asp:BoundField HeaderText="学员编号" DataField="StuID" />
                    <asp:BoundField HeaderText="姓名" DataField="S_Name" />
                    <asp:TemplateField HeaderText="性别">
                        <ItemTemplate>
                            <%#Eval("S_Gender").ToString()=="0"? "男":"女" %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="手机" DataField="S_Phone" />
                    <asp:BoundField HeaderText="家庭电话" DataField="S_HomePhone" />
                    <asp:TemplateField HeaderText="班级">
                        <ItemTemplate>
                            <%#Get_ClassID((int)Eval("S_ClassID")) %>
                        </ItemTemplate>
                    </asp:TemplateField>  
                    <asp:TemplateField HeaderText="入学日期">
                        <ItemTemplate>
                            <%#Convert.ToDateTime(Eval("S_StudyDate")).ToShortDateString()%>
                        </ItemTemplate>
                    </asp:TemplateField>         
                </Columns>
            </asp:GridView>
            <FrameWorkWebControls:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged">
            </FrameWorkWebControls:AspNetPager>
        </FrameWorkWebControls:TabOptionItem>
        <FrameWorkWebControls:TabOptionItem ID="TabOptionItem2" runat="server" Tab_Name="查询">
            <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                <tr>
                    <td class="table_body table_body_NoWidth">
                        学员姓名
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <asp:TextBox ID="S_Name" runat="server" CssClass="text_input"></asp:TextBox>
                    </td>
                    <td class="table_body table_body_NoWidth">
                        归属
                    </td>
                    <td class="table_none table_none_NoWidth">
                        <input type="hidden" runat="server" name="S_ClassID" id="S_ClassID" value=""><input
                            runat="server" name="S_ClassID_Txt" id="S_ClassID_Txt" size="15" value="" class="text_input"
                            readonly="readonly">
                        <input type="button" value="选择归属" id="button3" name="buttonselect" onclick="javascript:ShowDepartID()"
                            class="cbutton">
                        <input type="button" value="清除" onclick="javascript:ClearSelect();" class="cbutton" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4" align="right">
                        <asp:Button ID="Button1" runat="server" CssClass="button_bak" Text="查询" OnClick="Button1_Click" />
                    </td>
                </tr>
            </table>
        </FrameWorkWebControls:TabOptionItem>
    </FrameWorkWebControls:TabOptionWebControls>
    <script type="text/javascript">
        function ShowDepartID() {
            showPopWin('选择归属', 'SelectGroup.aspx?' + rand(10000000), 215, 255, AlertMessageBox, true, true);
        }
        function AlertMessageBox(file_name) {
            if (file_name != undefined) {
                var ShValues = file_name.split('||');
                if (ShValues[1]!=0)
	            {
	                document.all.<%=S_ClassID_Txt_ID %>.value=ShValues[0];
	                document.all.<%=S_ClassID_ID %>.value=ShValues[1];
	            }
            }
        }
        rnd.today = new Date();

        rnd.seed = rnd.today.getTime();

        function rnd() {
            rnd.seed = (rnd.seed * 9301 + 49297) % 233280;
            return rnd.seed / (233280.0);

        };

        function rand(number) {
            return Math.ceil(rnd() * number);

        };
        function ClearSelect()
        {
   	        document.all.<%=S_ClassID_Txt_ID %>.value="";
            document.all.<%=S_ClassID_ID %>.value="";
        } 
    </script>
</asp:Content>
